{% extends 'mbook.html' %}

{% block content %}
    <div id="account">
        <div class="table-info">
            <div class="top">
                <a type="button" class="btn btn-outline-secondary btn-sm add" href="/admin/add/">
                    <i class="bi bi-plus-circle"></i>
                    新增
                </a>
                <div class="right">
                    <input placeholder="请输入需要查询的图书">
                    <svg t="1694574809425" class="icon" viewBox="0 0 1024 1024" version="1.1"
                         xmlns="http://www.w3.org/2000/svg" p-id="1910" width="32" height="32">
                        <path d="M629.034667 629.034667Q704 554.026667 704 448q0-106.026667-74.965333-181.034667Q554.026667 192 448 192q-106.026667 0-181.034667 74.965333Q192 341.973333 192 448q0 106.026667 74.965333 181.034667Q341.973333 704 448 704q106.026667 0 181.034667-74.965333z m-30.165334-331.904Q661.333333 359.68 661.333333 448q0 88.362667-62.464 150.869333Q536.32 661.333333 448 661.333333q-88.362667 0-150.869333-62.464Q234.666667 536.32 234.666667 448q0-88.362667 62.464-150.869333Q359.68 234.666667 448 234.666667q88.362667 0 150.869333 62.464z"
                              fill="#111111" p-id="1911"></path>
                        <path d="M612.437333 624.938667l149.333334 149.333333a21.333333 21.333333 0 1 1-30.208 30.165333l-149.333334-149.333333a21.333333 21.333333 0 1 1 30.208-30.165333z"
                              fill="#111111" p-id="1912"></path>
                    </svg>
                </div>
            </div>
            <div class="card">
                <h6 class="card-header">
                    <i class="bi bi-list"></i>
                    图书列表
                </h6>
                <div class="card-body">
                    <table class="table">
                        <thead class="thead-light">
                        <tr>
                            <th scope="col">书名</th>
                            <th scope="col">作者</th>
                            <th scope="col">出版社</th>
                            <th scope="col">出版日期</th>
                            <th scope="col">价格</th>
                            <th scope="col">短评</th>
                            <th scope="col">操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        {% for obj in book_data %}
                        <tr>
                            <td>{{ obj.book_name }}</td>
                            <td>{{ obj.autor }}</td>
                            <td>{{ obj.publisher }}</td>
                            <td>{{ obj.publisher_data }}</td>
                            <td>{{ obj.price }}</td>
                            <td>{{ obj.comment }}</td>
                            <td>
                                <a class="btn btn-primary">编辑</a>
                                <a class="btn btn-primary">删除</a>
                            </td>
                        </tr>
                        {% endfor %}
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
{% endblock %}

